import { createRouter, createWebHistory } from 'vue-router'
import EmployeeList from '@/views/EmployeeList.vue'
import EmployeeAdd from '@/views/EmployeeAdd.vue'
import EmployeeEdit from '@/views/EmployeeEdit.vue'

const routes = [
  { path: '/', redirect: '/employees' },
  { path: '/employees', component: EmployeeList, name: 'EmployeeList' },
  { path: '/employees/add', component: EmployeeAdd, name: 'EmployeeAdd' },
  { path: '/employees/edit/:id', component: EmployeeEdit, name: 'EmployeeEdit' }
]

const router = createRouter({
  history: createWebHistory(),
  routes
})

export default router